﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_DoiMatKhau : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("TxtMatKhauCu")]
        private TextBox _TxtMatKhauCu;
        [AccessedThroughProperty("txtMatKhauMoi")]
        private TextBox _txtMatKhauMoi;
        [AccessedThroughProperty("TxtXacNhan")]
        private TextBox _TxtXacNhan;
        private IContainer components;
        private clsNguoiDung objND;

        public Frm_DoiMatKhau()
        {
            base.Load += new EventHandler(this.Frm_DoiMatKhau_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objND = new clsNguoiDung();
            this.InitializeComponent();
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            this.objND.Load(modGeneral.H_USERNAME);
            if (modGeneral.MD5Encrypt(this.TxtMatKhauCu.Text.Trim()) != this.objND.MatKhau)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập mật khẩu cũ!", ""));
            }
            else if (this.txtMatKhauMoi.Text.Trim() != this.TxtXacNhan.Text.Trim())
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải x\x00e1c nhận lại mật khẩu!", ""));
            }
            else
            {
                this.objND.ChangePassword(modGeneral.H_USERNAME, modGeneral.MD5Encrypt(this.txtMatKhauMoi.Text));
                LVYModule.ShowWarning(modGeneral.Tranlated("Mật khẩu của bạn đ\x00e3 được thay đổi!", ""));
                this.Dispose();
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_DoiMatKhau_Load(object sender, EventArgs e)
        {
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_DoiMatKhau));
            this.TxtMatKhauCu = new TextBox();
            this.Label1 = new Label();
            this.Label2 = new Label();
            this.txtMatKhauMoi = new TextBox();
            this.Label3 = new Label();
            this.TxtXacNhan = new TextBox();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.SuspendLayout();
            Point point = new Point(0x61, 0x13);
            this.TxtMatKhauCu.Location = point;
            this.TxtMatKhauCu.Name = "TxtMatKhauCu";
            Size size = new Size(0xcc, 20);
            this.TxtMatKhauCu.Size = size;
            this.TxtMatKhauCu.TabIndex = 0;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0x15, 0x16);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x43, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 1;
            this.Label1.Text = "Mật khẩu cũ";
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0x15, 0x35);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x47, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 3;
            this.Label2.Text = "Mật khẩu mới";
            point = new Point(0x61, 50);
            this.txtMatKhauMoi.Location = point;
            this.txtMatKhauMoi.Name = "txtMatKhauMoi";
            this.txtMatKhauMoi.PasswordChar = '*';
            size = new Size(0xcc, 20);
            this.txtMatKhauMoi.Size = size;
            this.txtMatKhauMoi.TabIndex = 2;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(0x15, 0x55);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x35, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 5;
            this.Label3.Text = "X\x00e1c nhận";
            point = new Point(0x61, 0x52);
            this.TxtXacNhan.Location = point;
            this.TxtXacNhan.Name = "TxtXacNhan";
            this.TxtXacNhan.PasswordChar = '*';
            size = new Size(0xcc, 20);
            this.TxtXacNhan.Size = size;
            this.TxtXacNhan.TabIndex = 4;
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0xdf, 0x77);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 7;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(140, 0x77);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 6;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            this.AcceptButton = this.CmdOK;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.CancelButton = this.CmdCancel;
            size = new Size(0x143, 0x95);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.Controls.Add(this.Label3);
            this.Controls.Add(this.TxtXacNhan);
            this.Controls.Add(this.Label2);
            this.Controls.Add(this.txtMatKhauMoi);
            this.Controls.Add(this.Label1);
            this.Controls.Add(this.TxtMatKhauCu);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_DoiMatKhau";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "DOI MAT KHAU";
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        private void txtMatKhauMoi_TextChanged(object sender, EventArgs e)
        {
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual TextBox TxtMatKhauCu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMatKhauCu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtMatKhauCu = value;
            }
        }

        internal virtual TextBox txtMatKhauMoi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtMatKhauMoi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.txtMatKhauMoi_TextChanged);
                if (this._txtMatKhauMoi != null)
                {
                    this._txtMatKhauMoi.TextChanged -= handler;
                }
                this._txtMatKhauMoi = value;
                if (this._txtMatKhauMoi != null)
                {
                    this._txtMatKhauMoi.TextChanged += handler;
                }
            }
        }

        internal virtual TextBox TxtXacNhan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtXacNhan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtXacNhan = value;
            }
        }
    }
}

